package com.server.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.server.common.security.code.thread.ThreadLocalHeaderUtils;
import com.server.model.all.system.bo.AddLogOperationBo;
import com.server.common.code.utils.BeanUtils;
import com.server.model.all.system.entity.UserOperationLogEntity;
import com.server.system.mapper.UserOperationLogMapper;
import com.server.system.service.UserOperationLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class UserOperationLogServiceImpl extends ServiceImpl<UserOperationLogMapper, UserOperationLogEntity> implements UserOperationLogService {

    @Resource
    private UserOperationLogMapper userOperationLogMapper;


    /**
     * 操作记录
     * @author LXC
     * @date 2022/6/8 0:16
     */
    @Override
    public int addLogOperation(AddLogOperationBo addLogOperationBo) {
        UserOperationLogEntity userOperationLogEntity = BeanUtils.copyProperties(addLogOperationBo, UserOperationLogEntity.class);
        return userOperationLogMapper.insert(userOperationLogEntity);
    }

}

